package com.dau.system.config.jwt;

import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * web配置
 *
 * @author tzj
 * @date 2024/11/15
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Resource
    private CurrentUserResolver currentUserHandlerResolver;

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        //添加当前用户的注解解析
        resolvers.add(currentUserHandlerResolver);
    }
}
